Fputchar(2) Oct. 1, 1991 Fputchar(2) NAME Fputchar - read a character from a file SYNOPSIS LONG Fputchar( WORD fh, LONG ch, WORD mode ); DESCRIPTION Fputchar outputs a character to the GEMDOS file whose handle is fh. The parameter mode has an effect only if the open file is a terminal or pseudo-terminal, in which case the bits of mode have the following meanings: 0x0001 Cooked mode; special control characters (control-C and control-Z) are checked for and interpreted if found (they cause SIGINT and SIGTSTP, respectively, to be raised); also, flow control with control-S and control-Q is activated. If the file receiving output is a pseudo-terminal, then all 4 bytes of ch are recorded in the write, and may be retreived by a Fputchar call on the other side of the pseudo-terminal; this allows programs to pass simulated BIOS scan codes and shift key status through the pseudo-terminal. If the file receiving output is not a terminal, then only the low order byte of ch is written to the file. RETURNS 4 (the number of bytes of data transferred) if the write was to a terminal 1 if the write was not to a terminal and was successful 0 if the bytes could not be output (for example, because of flow control) EIHNDL if fh is not a valid handle for an open file. A (long) negative BIOS error code if an error occured during physical I/O. SEE ALSO Bconout(2), Cauxout(2), Cconout(2), Crawio(2), Fgetchar(2), Fwrite(2) Version 0.9 Last change: MiNT Programmer's Manual 1